package cn.imvc.app.models;

import org.springframework.data.domain.Page;

import cn.imvc.app.entities.Withdrawals;
import cn.imvc.data.domain.ViewRequest;

public interface WithdrawalsModel{
	/**
	 * 查找所有的提现记录/默认是当天
	 * @param viewRequest
	 * @return
	 */
	Page<Withdrawals> findAll(ViewRequest viewRequest);
	
	/**
	 * 提现成功
	 * @param id
	 */
	void updateWithdrawalsSuccess(int id,Withdrawals withdrawals);
	/**
	 * 提现驳回
	 * @param id
	 */
	void updateWithdrawalsFail(int id,Withdrawals withdrawals);

	Withdrawals getOne(int id);
	/**
	 * 通过用户id查找其分佣
	 * @param viewRequest
	 * @param id
	 * @return
	 */
	Page<Withdrawals> findAllByMemberId(ViewRequest viewRequest, int id);
}